Optimal. Leaf size=22 \[ \sqrt{\sin ^2(x)}-x \sqrt{\sin ^2(x)} \cot (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0545788, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {6720, 3296, 2637} \[ \sqrt{\sin ^2(x)}-x \sqrt{\sin ^2(x)} \cot (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6720
Rule 3296
Rule 2637
Rubi steps
\begin{align*} \int x \sqrt{\sin ^2(x)} \, dx &=\left (\csc (x) \sqrt{\sin ^2(x)}\right ) \int x \sin (x) \, dx\\ &=-x \cot (x) \sqrt{\sin ^2(x)}+\left (\csc (x) \sqrt{\sin ^2(x)}\right ) \int \cos (x) \, dx\\ &=\sqrt{\sin ^2(x)}-x \cot (x) \sqrt{\sin ^2(x)}\\ \end{align*}
Mathematica [A] time = 0.0161902, size = 16, normalized size = 0.73 \[ \sqrt{\sin ^2(x)} (1-x \cot (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.147, size = 75, normalized size = 3.4 \begin{align*}{\frac{-{\frac{i}{2}}{{\rm e}^{2\,ix}} \left ( x+i \right ) }{{{\rm e}^{2\,ix}}-1}\sqrt{- \left ({{\rm e}^{2\,ix}}-1 \right ) ^{2}{{\rm e}^{-2\,ix}}}}-{\frac{{\frac{i}{2}} \left ( x-i \right ) }{{{\rm e}^{2\,ix}}-1}\sqrt{- \left ({{\rm e}^{2\,ix}}-1 \right ) ^{2}{{\rm e}^{-2\,ix}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.70675, size = 12, normalized size = 0.55 \begin{align*} x \cos \left (x\right ) - \sin \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.461237, size = 27, normalized size = 1.23 \begin{align*} -x \cos \left (x\right ) + \sin \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.08574, size = 24, normalized size = 1.09 \begin{align*} - \frac{x \sqrt{\sin ^{2}{\left (x \right )}} \cos{\left (x \right )}}{\sin{\left (x \right )}} + \sqrt{\sin ^{2}{\left (x \right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.11372, size = 20, normalized size = 0.91 \begin{align*} -x \cos \left (x\right ) \mathrm{sgn}\left (\sin \left (x\right )\right ) + \mathrm{sgn}\left (\sin \left (x\right )\right ) \sin \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]